import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}

// 获取用户信息的接口
export function userInfo() {
  return request({
    url: '/users/me'
  })
}

// 注册接口
export function register(data) {
  return request({
    url: '/auth/local/register',
    method: 'post',
    data
  })
}

// 获取用户权限接口

export function permissionRoutes() {
  return request({
    url: '/mypermissions'
  })
}
